---
title: "Site24x7 Provider"
description: "The Site24x7 Provider allows you to install webhooks and receive alerts in Site24x7. It manages authentication, setup of webhooks, and retrieval of alert logs from Site24x7."
---

## Inputs

The `Site24x7Provider` class handles authentication and interacts with the Site24x7 API to install webhooks and fetch alerts. Here are the primary methods and their parameters:

### Main Class Methods

- **`setup_webhook(tenant_id, keep_api_url, api_key, setup_alerts)`**
  - `tenant_id (str)`: Tenant identifier.
  - `keep_api_url (str)`: URL to send alert data.
  - `api_key (str)`: API key for authentication.
  - `setup_alerts (bool)`: Whether to setup alerting capabilities (default is True).

- **`_get_alerts()`**
  - Returns a list of `AlertDto` objects representing the alerts.

### Authentication Parameters

The `Site24x7ProviderAuthConfig` class is used for API authentication and includes:

- **`zohoRefreshToken (str)`**: Refresh token for Zoho authentication. *Required*
- **`zohoClientId (str)`**: Client ID for Zoho authentication. *Required*
- **`zohoClientSecret (str)`**: Client Secret for Zoho authentication. *Required*
- **`zohoAccountTLD (str)`**: Top-Level Domain for the Zoho account. Options include `.com`, `.eu`, `.com.cn`, `.in`, `.com.au`, `.jp`. *Required*

## Connecting with the Provider

To use the Site24x7 Provider, initialize it with the necessary authentication credentials and provider configuration. Ensure that your Zoho account credentials (Client ID, Client Secret, and Refresh Token) are correctly set up in the `Site24x7ProviderAuthConfig`.

## Steps to Obtain a Refresh Token

1. **Registration and Client Credentials:**
   - Navigate to [Zoho API Console](https://api-console.zoho.com/).
   - Sign in or sign up using the email associated with your Site24x7 account.
   - Register your application using the "Self Client" option to get your Client ID and Client Secret.

2. **Generating Grant Token:**
   - Go to the Zoho Developer Console and access your registered Self Client.
   - In the "Generate Code" tab, input the required scopes (`Site24x7.Admin.Read, Site24x7.Admin.Create, Site24x7.Operations.Read`), description, and time duration.
   - Click "Generate" and copy the provided code.

3. **Generating Access and Refresh Tokens:**
   - Use the grant token to make a POST request to `https://accounts.zoho.com/oauth/v2/token` to obtain the access and refresh tokens.

    ```bash
    curl -X POST 'https://accounts.zoho.com/oauth/v2/token' \
         -d 'client_id=your_client_id' \
         -d 'client_secret=your_client_secret' \
         -d 'code=your_grant_token' \
         -d 'grant_type=authorization_code'

   ```

    OR

    ```python
    import requests

    response = requests.post(
        'https://accounts.zoho.com/oauth/v2/token',
        data={
            'client_id': 'your_client_id',
            'client_secret': 'your_client_secret',
            'code': 'your_grant_token',
            'grant_type': 'authorization_code'
        }
    )
    refresh_token = response.json().get('refresh_token')
    ```

---
## Notes

- You must use your domain-specific Zoho Accounts URL to generate refresh tokens, otherwise you will receive an `invalid_client` error. See [Data center for Zoho Account](https://help.zoho.com/portal/en/kb/accounts/manage-your-zoho-account/articles/data-center-for-zoho-account).
- Ensure that the necessary scopes **Site24x7.Admin.Read, Site24x7.Admin.Create, Site24x7.Operations.Read** are included when generating the grant token, as they dictate the API functionalities accessible via the provider.
- Zoho API Console [Link](https://api-console.zoho.com)


## Webhook Integration Modifications

The webhook integration grants Keep access to the following scopes within Site24x7:
- `authenticated`
- `valid_tld`

The webhook can be accessed via the "Alarms" section in the Site24x7 console.

---

## Useful Links

- [Site24x7 API Documentation](https://www.site24x7.com/help/api/)
- [Zoho OAuth Documentation](https://www.zoho.com/accounts/protocol/oauth/web-apps.html)
- [Site 24x7 Authentication Guide](https://www.site24x7.com/help/api/#authentication)
- [Third Party and Webhook Integrations](https://www.site24x7.com/help/api/#third-party-integrations)
- [List of Zoho Account datacenters](https://help.zoho.com/portal/en/kb/accounts/manage-your-zoho-account/articles/data-center-for-zoho-account)
